<template>
  <div class="home">
    <h1>我是列表页</h1>
    <ul>
      <li v-for="item in list" :key="item.id">
        <router-link
          :to="{
            name: 'Detail',
            query: { id: item.id, name: item.name, r: Math.random() },
            params: { p: '小智', age: 18, skills: '玩游戏' }
          }"
          >{{ item.name }}</router-link
        >
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      list: [
        { id: 1, name: '卡布达' },
        { id: 2, name: '刘死狗' },
        { id: 3, name: '筱筱' },
        { id: 4, name: '冗梓默' }
      ]
    }
  }
}
</script>

<style scoped>
.home {
  background-color: aquamarine;
}
</style>
